package day03;
//判断两个条件的示例
public class IfElseDemo2 {
    public static void main(String[] args) {
        //1)满500打8折，不满500打9折:
        double price = 300.0;   //带数(600.0,300.0)
        if(price>=500){//判断消费金额是否满足500
            price*=0.8; //满足，打8折
        }else{
            price*=0.9;//不满足，打9折
        }
        System.out.println("最终结算金额为:"+price);


        //2)判断成绩合法还是不合法:
        double score = 55;   //带数(95-5,555)
        if(score>=0 && score<=100){//判断成绩是否在合法范围内
            //输出是合法成绩
            System.out.println(score+"是合法成绩");
        }else{
            //输出是不合法成绩
            System.out.println(score+"是不合法成绩");
        }
    }
}
